<template>
  <div class="echart-grid">
    <FormItem
      :form="form"
      option="echart.series.top"
      :label="$demoi18n('word.paddingTop')"
      type="number"
      serie-type="sankey"
    />
    <FormItem
      :form="form"
      option="echart.series.bottom"
      :label="$demoi18n('word.paddingDown')"
      type="number"
      serie-type="sankey"
    />
    <FormItem
      :form="form"
      option="echart.series.left"
      :label="$demoi18n('word.paddingLeft')"
      type="number"
      serie-type="sankey"
    />
    <FormItem
      :form="form"
      option="echart.series.right"
      :label="$demoi18n('word.paddingRight')"
      type="number"
      serie-type="sankey"
    />
    <FormItem
      :form="form"
      option="echart.backgroundColor"
      :label="$demoi18n('word.backgroundColor')"
      type="color"
    />
  </div>
</template>
<script>
import FormItem from '@/components/common/echart/form-item.vue';

export default {
  components: { FormItem },
  mixins: [],
  props: {
    form: Object,
  },
  data() {
    return {};
  },
  computed: {},
  watch: {
    'form.echart.backgroundColor'(color) {
      const titleCss = this.form.cssStyle && this.form.cssStyle.title;
      if (titleCss) {
        titleCss.backgroundColor = color;
      }
    },
  },
  methods: {},
};
</script>
<style lang="less" scoped></style>
